(function(){

'use strict';

angular.module('controllers.faultLocation.pbossOm')
  .controller('sysTradingController', sysTradingController);

function sysTradingController ($scope,pbossOmServer,reponsestate,requeststate,COREDATA,$filter) {
	$scope.shoumun = 0;
  pbossOmServer.querytradeType();
  $scope.items=reponsestate.trading;
  //查询条件参数数据类型
	$scope.dateTypes = [
		{tradTypeName:'数据一致性',tradTypeCode:'01'},
		{tradTypeName:'EC信息同步',tradTypeCode:'01'},
		{tradTypeName:'EC企业产品订购',tradTypeCode:'01'},
		{tradTypeName:'EC成员产品订购',tradTypeCode:'01'},
		{tradTypeName:'号码信息同步',tradTypeCode:'01'},
		{tradTypeName:'制卡订单受理',tradTypeCode:'01'}
	];
    
    $scope.launchPlatforms=[
      {launchPlatformName:'省BOSS系统',launchPlatformCode:'01'},
      {launchPlatformName:'物联网',launchPlatformCode:'01'},  
      {launchPlatformName:'B-BOSS',launchPlatformCode:'01'},  
      {launchPlatformName:'内容计费结算系统',launchPlatformCode:'01'},  
      {launchPlatformName:'全网物联网运管平台',launchPlatformCode:'01'},
      {launchPlatformName:'物联网业务网关',launchPlatformCode:'01'},    
      {launchPlatformName:'中央SISM',launchPlatformCode:'01'},  
      {launchPlatformName:'HLR',launchPlatformCode:'01'},  
    ]
   $scope.landingPlatforms=[
     {landingPlatformName:'省BOSS系统',landingPlatformCode:'01'},
     {landingPlatformName:'物联网',landingPlatformCode:'01'},
     {landingPlatformName:'B-BOSS',landingPlatformCode:'01'},
     {landingPlatformName:'内容计费结算系统',landingPlatformCode:'01'},
     {landingPlatformName:'全网物联网运管平台',landingPlatformCode:'01'},
     {landingPlatformName:'物联网业务网关',landingPlatformCode:'01'},
     {landingPlatformName:'物联网业务平台',landingPlatformCode:'01'},
     {landingPlatformName:'中央SISM',landingPlatformCode:'01'},
     {landingPlatformName:'HLR',landingPlatformCode:'01'}
   ]

  $scope.date=requeststate.trading;
  $scope.queryAllChannel = function() {
	  $scope.shoumun==1?$scope.shoumun=0:$scope.shoumun=1;
	  if($scope.shoumun === 0){
		 pbossOmServer.querytradeType();
		 $scope.items=reponsestate.trading;
	  }
  };
  /**
   * 重置按钮
   */
   $scope.reset=function(){
   $scope.trading=undefined;
   $scope.date=requeststate.trading;
   $scope.shoumun=1;
  }
  $scope.ExportList={}
  $scope.excelExport= COREDATA.FORMPREFIX +'OMdisplay/PBossOM/systemTrade/timeout/export'
  $scope.ExportList.startTime = $filter('date')($scope.date.startTime,'yyyy-MM-dd');
  $scope.ExportList.endTime = $filter('date')($scope.date.endTime,'yyyy-MM-dd');
  $scope.ExportList.title = '分平台统计结果'+$filter('date')($scope.date.startTime,'yyyy-MM-dd');+'至'+ $filter('date')($scope.date.endTime,'yyyy-MM-dd');
  $scope.ExportList=requeststate.trading
}
sysTradingController.$inject=['$scope','pbossOmServer','reponsestate','requeststate','COREDATA','$filter'];
})();